import requests
from urllib import parse
ua = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 ' \
     'Safari/537.36 '
url = 'https://movie.douban.com'
d = {
    'type': 'movie',
    'tag': '热门',
    'page_limit': 10,
    'page_start': 10

}
url = '{}?{}'.format(url, parse.urlencode(d))
response = requests.request('GET', url, headers={'User-Agent': ua})
with response:
    print(type(response))
    print(response.url)
    print(response.status_code)
    print(response.text)
    with open('movie.html', 'w', encoding='utf-8') as f:
        f.write(response.text)
